1. Field of the Invention
The present invention relates generally to analog-to-digital converters. In particular, the present invention relates to the use of microcode to dynamically adjust the analog-to-digital converter.
2. Background and Relevant Art
Electronic and computing technology has transformed the way that we work and play. The complexity of such systems facilitates the accomplishment of complex tasks that would not be possible (or at least would be very difficult) without the assistance of the system.
A core function behind such systems is the ability to process and interpret electrical signals. Some electrical signals may be continuously variable and able to represent any value in a continuous spectrum. These signals are often referred to as “analog” signals. For example, many sensors initial convert measured physical phenomenon (such as, for example, supply voltages, receive and transmit strength, temperature, and the like) into an analog signal.
Another kind of electrical signal is one that is not continuously variable, but only takes discrete values. Digital signals have the disadvantage of only being able to represent discrete values. If a value between neighboring discrete values is to be represented, some error is introduced by having to represent that value with a neighboring discrete value in digital form. Nevertheless, the use of digital signals also has many advantages over analog signals. For example, digital values can be directly processed by a microprocessor or other digital systems.
Since the use of analog signals and the use of digital signals both have there advantages depending on the particular function being performed, many circuits include both analog components which process analog signals, and digital components which process digital signals. In order to allow these analog and digital components to interact, often digital signals are converted to analog signals using Digital-to-Analog Converters (i.e., “DACs”). Likewise, analog signals are often converted to digital signals using Analog-to-Digital Converters (i.e., “ADCs”).
Analog-to-digital converters convert an analog signal into a digital signal having a certain number of bits of resolution. The more bits the analog signal is converted into, the more accurate on average is the digital representation of that analog signal. For example, an 8-bit analog-to-digital converter converts an analog signal into an 8-bit digital value. A 12-bit analog-to-digital converter converts an analog signal into a more precise 12-bit digital value.
Analog-to-digital converters tend to be quite large as they use many devices in order to perform the conversion, particularly if high speed conversion is desired. Furthermore, the higher the resolution of the conversion (i.e., the higher the number of bits that the analog signal is converted into), the more components are required.
Analog-to-digital converters do have certain limits in that they can only convert an analog signal within a certain voltage range to a digital signal. Generally speaking, the closer the analog signal is to the boundaries of this range, the less accurate the digital representation. Analog signals outside of the range have significant error. Accordingly, the analog-to-digital converter is designed so that the analog signals average around the middle of the input range of the analog-to-digital converter, while hopefully never exceeding the boundaries of the range. Analog signals are statically amplified to hopefully meet these parameters.
However, there may be considerable uncertainty in the voltage level of the analog signal. For example, in a given system there may be many sensors that monitor a wire variety of physical phenomena such as power levels, receive and transmit strength, and temperature. In order to be interpreted by a microprocessor, these various analog signals would need to be converted into a digital signal. To reduce the number of analog-to-digital converters, these various analog signals may be time-division-multiplexed so that each has its own turn being provided to the analog-to-digital converter. For example, the temperature analog signal may be provided to the analog-to-digital converter during one time slot, the power supply level analog signal may be provided to the analog-to-digital converted during another time slot, and so forth. So that each analog signal is within the range of the analog-to-digital circuit, each analog signal may be scaled.
Such scaling is typically fairly static having a relatively constant and non-adjustable gain. Accordingly, if the analog signal provided by the sensor runs to one extreme or the other, the scaled signal will also tend to press the boundaries of (or even exceed) the range of the analog-to-digital converter. To guard against this, many analog-to-digital circuits convert to a higher number of bits and are designed for a broader range. However, this increases the complexity and size of the analog-to-digital converter.
Accordingly, what would be advantageous are mechanism in which the scaling of the analog signal provided to the analog-to-digital signal may be dynamically adjusted, while still having the resulting digital signals properly interpreted by the system to account for dynamically changing gain.